import Router from 'koa-router'
import LicenseController from '@/controllers/license'

const router = new Router({
    prefix: '/carpark/license_record'
})

// 创建车牌记录
router.post('/create.json', LicenseController.create)
// 更新车牌记录
router.post('/update.json', LicenseController.update)
// 删除车牌记录
router.post('/delete.json', LicenseController.delete)
// 查询具体车牌记录
router.post('/query.json', LicenseController.query)
// 查询车牌记录列表
router.post('/list.json', LicenseController.list)
// 查询车牌记录列表
router.post('/userList.json', LicenseController.userList)

export const unprotectedRouter = new Router().post('/', async (ctx) => {
    ctx.body = {
        message: '查询配置的信息'
    }
})

export const protectedRouter = router
